package com.atguigu.lease.web.admin.service.impl;

import com.atguigu.lease.model.entity.SystemUser;
import com.atguigu.lease.web.admin.mapper.SystemUserMapper;
import com.atguigu.lease.web.admin.service.SystemUserService;
import com.atguigu.lease.web.admin.vo.system.user.SystemUserItemVo;
import com.atguigu.lease.web.admin.vo.system.user.SystemUserQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author xiongkunYang
 * @description 针对表【system_user(员工信息表)】的数据库操作Service实现
 * @createDate 2025-04-19 22:27:34
 */
@Service
public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemUser>
        implements SystemUserService {

    private final SystemUserMapper systemUserMapper;

    public SystemUserServiceImpl(SystemUserMapper systemUserMapper) {
        this.systemUserMapper = systemUserMapper;
    }

    @Override
    public IPage<SystemUserItemVo> systemUserPageByQuery(long current, long size, SystemUserQueryVo queryVo) {
        Page<SystemUserItemVo> page = new Page<>(current, size);
        return this.systemUserMapper.selectSystemUserPageByQuery(page, queryVo);
    }

    @Override
    public SystemUserItemVo getSystemUserItemById(Long id) {
        return this.systemUserMapper.selectSystemUserItemById(id);
    }
}




